@include('admin.common.header')
<style>
    ul.summary-list > li {
        display: inline-block;
        width: 14%;
        text-align: center;
    }
</style>
<!--tab nav start-->
<section class="panel">
    <header class="panel-heading tab-bg-dark-navy-blue ">
        <ul class="nav nav-tabs">
            <li class="active">
                <a data-toggle="tab" href="/admin/order">订单列表</a>
            </li>
            <li class="">
                <a data-toggle="tab" href="/admin/order/count">订单统计</a>
            </li>
        </ul>
    </header>
    <div class="panel-body">
        <div class="tab-content">
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        @if($order['pageData']['count'] == 0)
                            <div class="no-data">暂无要查询的内容</div>
                        @else
                            <div class="panel-body">
                                @foreach($order['list'] as $o)
                                    <ul class="summary-list">
                                        <li>
                                            <a href="javascript:;">
                                                店铺名称:<div>{{ $o->sname }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                订单号:<div>{{ $o->order_num }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                商品总价:<div>{{ $o->g_total_price }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                服务费:<div>{{ $o->service_charge }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                总价:<div>{{ $o->pay_total }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                状态:<div>{{ $o->status_msg }}</div>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">
                                                下单时间:<div>{{ $o->created_at }}</div>
                                            </a>
                                        </li>
                                    </ul>
                                    <hr>
                                    <table class="table alert-success">
                                        <thead>
                                        <tr>
                                            <th>商品名称</th>
                                            <th>商品规格</th>
                                            <th>商品产地</th>
                                            <th>商品图片</th>
                                            <th>商品价格</th>
                                            <th>购买数量</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        @foreach($o->goods as $og)
                                            <tr>
                                                <td>{{ $og->show_title }}</td>
                                                <td>{{ $og->unit }}</td>
                                                <td>{{ $og->producing_area }}</td>
                                                <td><img style="width: 50px;height: 50px;" src="{{ $og->img['imgUrl'] }}"/></td>
                                                <td>{{ $og->now_price }}</td>
                                                <td>{{ $og->buy_num }}</td>
                                            </tr>
                                        @endforeach
                                        <tr class="alert-success">
                                            <td>收货人: {{ $o->name }}</td>
                                            <td colspan="4">收货地址: {{ $o->address }} {{ $o->house_number }}</td>
                                            <td>联系方式: {{ $o->mobile }}</td>
                                        </tr>
                                        </tbody>
                                    </table>
                                @endforeach
                            </div>
                        @endif
                    </section>
                </div>
            </div>
            @if($order['pageData']['lastPage'] > 1)
                <div id="page" style="width:500px;margin: 0 auto;">
                    {!!  $order['pageData']['pageHtml'] !!}
                </div>
            @endif
        </div>
    </div>
</section>
<!--tab nav start-->

@include('admin.common.footer')